﻿-- =============================================
-- Script Template首页新闻存储过程
-- =============================================
if exists(select * from sysobjects where name='proc_pm_newsShowsCount')
drop proc proc_pm_newsShowsCount
go
create procedure proc_pm_newsShowsCount
@sum int,--访问条数
@typeid int --类型ID
as
begin
select top (@sum) Id, NewsInTime, Keyword, NewsTitle, NewsTag, CreateUser from pm_newsShows where TypeId=@typeid and NewsState=0  order by NewsInTime desc
end

-- =============================================
-- Script Template首页新闻存储过程
-- =============================================
if exists(select * from sysobjects where name='proc_pm_newsShowsContentCount')
drop proc proc_pm_newsShowsContentCount
go
create procedure proc_pm_newsShowsCount
@sum int,--访问条数
@typeid int --类型ID
as
begin
select top (@sum) Id, NewsInTime, Keyword, NewsTitle, NewsTag, CreateUser from pm_newsShows where TypeId=@typeid and NewsState=0  order by NewsInTime desc
end

if exists(select * from sysobjects where name='proc_pm_newsShowsContentCount')
drop proc proc_pm_newsShowsContentCount
go
create procedure proc_pm_newsShowsContentCount
@sum int,--访问条数
@typeid int --类型ID
as
begin
select top (@sum) Id, NewsInTime, Keyword, NewsTitle,NewsContent, NewsTag, CreateUser from pm_newsShows where TypeId=@typeid and NewsState=0  order by NewsInTime desc
end
